
Page(
    {
    
  data: {
    active: 0,
    //通过list配合onChange函数实现页面跳转 
    list:[   
        {"url": "../index/index"},
        {"url": "../Community/index"},
        {"url": "../login/login"},
    ]
  },
  onLoad: function () {
    var that = this//不要漏了这句，很重要
    wx.request({
      url: 'https://diqu.gezhong.vip/api.php',
      headers: {
        'Content-Type': 'application/json'
      },
      success: function (res) {
         that.setData({
           date: res.data.data.end_update_time.date,
         })
      }
    })
  },

    //   通知栏点击
    notice_chick(event){
        wx.navigateTo({
            url: '../out/out',  //跳转页面书写在out下wxml中
        });
    },

    onChange(event) {
        this.setData({ active: event.detail });
        wx.navigateTo({
            url: this.data.list[event.detail].url ,
          });
      },

  
})
